<?php

use Illuminate\Support\Facades\Route;
//Wap 模块

Route::middleware(['his.auth'])->group(function () {
    // 患者端、医生端 退出登录
    Route::post('/wap/logout', [\App\User\Http\Controller\Wap\UserController::class, 'logOut']);

    // 患者端 添加就诊人
    Route::post('/wap/patients/add', [\App\User\Http\Controller\Wap\PatientsController::class, 'addPatients']);

    // 患者端 编辑就诊人
    Route::post('/wap/patients/edit', [\App\User\Http\Controller\Wap\PatientsController::class, 'editPatients']);

    // 患者端 删除就诊人
    Route::post('/wap/patients/del', [\App\User\Http\Controller\Wap\PatientsController::class, 'delPatients']);

    // 患者端 设置默认就诊人
    Route::post('/wap/patients/default', [\App\User\Http\Controller\Wap\PatientsController::class, 'setDefault']);

    // 患者端 获取就诊人列表
    Route::get('/wap/patients/getlist', [\App\User\Http\Controller\Wap\PatientsController::class, 'getList']);

    // 患者端 患者就诊记录
    Route::get('wap/patient/rescue', [\App\User\Http\Controller\Wap\PatientsController::class, 'mineRescue']);

    // 患者端 获取就诊人详情、默认就诊人
    Route::get('/wap/patients/getdata', [\App\User\Http\Controller\Wap\PatientsController::class, 'getData']);

    // 患者端 添加收货地址
    Route::post('/wap/ship/add', [\App\User\Http\Controller\Wap\ShipController::class, 'addShip']);

    // 患者端 编辑收货地址
    Route::post('/wap/ship/edit', [\App\User\Http\Controller\Wap\ShipController::class, 'editShip']);

    // 患者端 删除收货地址
    Route::post('/wap/ship/del', [\App\User\Http\Controller\Wap\ShipController::class, 'delShip']);

    // 患者端 设置默认收货地址
    Route::post('/wap/ship/default', [\App\User\Http\Controller\Wap\ShipController::class, 'setDefault']);

    // 患者端 获取收货地址列表
    Route::get('/wap/ship/getlist', [\App\User\Http\Controller\Wap\ShipController::class, 'getList']);

    // 患者端 获取收货地址详情
    Route::get('/wap/ship/getdata', [\App\User\Http\Controller\Wap\ShipController::class, 'getData']);

    // 患者端 更换绑定手机号
    Route::post('/wap/change_phone', [\App\User\Http\Controller\Wap\UserController::class, 'changePhone']);

    // 患者端 获取患者详情
    Route::get('/wap/user/info', [\App\User\Http\Controller\Wap\UserController::class, 'getInfo']);




    // 医生端 个人档案列表
    Route::get('wap/archive', [App\User\Http\Controller\Wap\ArchiveController::class, 'index']);

    // 医生端 建立个人档案
    Route::post('wap/create_archive', [\App\User\Http\Controller\Wap\ArchiveController::class, 'create']);

    // 医生端 修改个人档案
    Route::post('wap/update_archive', [\App\User\Http\Controller\Wap\ArchiveController::class, 'update']);

    // 医生端 个人档案详情
    Route::get('wap/archive_info', [App\User\Http\Controller\Wap\ArchiveController::class, 'info']);

    // 医生端 删除个人档案
    Route::post('wap/archive_delete/{id}', [App\User\Http\Controller\Wap\ArchiveController::class, 'delete']);

});

// 患者端 手机号登录接口
Route::get('/wap/login_by_phone', [\App\User\Http\Controller\Wap\UserController::class, 'loginByPhone']);
